package com.tianji.remark.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.remark.domain.dto.LikeRecordFormDTO;
import com.tianji.remark.domain.po.LikedRecord;
import org.springframework.data.redis.core.ZSetOperations;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 点赞记录表 服务类
 * </p>
 *
 * @author wxh
 * @since 2024-08-26
 */
public interface ILikedRecordService extends IService<LikedRecord> {

    /**
     * 点赞或取消点赞
     *
     * @param likeRecordFormDTO
     */
    void likeOrUnlike(LikeRecordFormDTO likeRecordFormDTO);

    /**
     * 查询用户是否点赞
     *
     * @param bizIds
     * @return
     */
    Set<Long> isLikeStatusAndUser(List<Long> bizIds);


    /**
     * 定时任务通知likedRecordService拉取redis中业务类型对应的bizId对应的点赞数
     *
     * @param likeType
     * @param maxBizSize
     */
    void pullRedisBizTypeAndLikeTimeTask(String likeType, Integer maxBizSize);
}
